package com.example.springcachedemo.dto;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;


/**
 * @author lzh
 * @date 2020/3/2 - 9:49
 */
@Data
@Document(collection = "user")
public class UserMongoDto {

    /**
     * Mongo文档的id 类型为String或 ObjectId 均可，但不能为Long类型
     */
    @Id
    private  String id;

    /**
     * mysql user表主键
     */
    private Long uid;

    private String username;

    private String address;
}
